package com.gsd.boot.activemq.consumer;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

import javax.jms.JMSException;
import javax.jms.TextMessage;

/**
 * @author guoshoudu
 * @version 1.0
 * @description
 * @date 2021/6/29 7:12 下午
 */
@Component
public class Queue_Consumer {
    @JmsListener(destination = "${myqueue}")
    public void receive(TextMessage textMessage)throws JMSException {
        System.out.println("******消费者收到消息："+textMessage.getText());
    }
}
